<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Ajax File Upload</title> 

<script type="text/javascript"> 
function init() {
	$("file_upload_form").onsubmit=function() {
		$("file_upload_form").target = "upload_target";
		$("upload_target").onload=function() {
			alert("Uploaded");
		}
	}
}
</script> 
</head> 
<body> 
 
<form id="file_upload_form" method="post" enctype="multipart/form-data" action="upload.php"> 
<input name="pictures" id="pictures" size="27" type="file" /><br /> 
<input type="submit" name="action" value="Upload" /><br /> 
<iframe id="upload_target" name="upload_target" src="" style="width:100px;height:100px;border:1px solid #ccc;"></iframe> 
</form> 
 

<script src="jsl.js" type="text/javascript"></script> 
<script src="common.js" type="text/javascript"></script> 

</body></html>